package com.hilaver.dzmis.basicinfo;

import java.sql.Blob;
import java.util.HashSet;
import java.util.Set;

import com.hilaver.dzmis.product.ProductDZColor;

public class BiYarn {
	
	private Integer id;
	private String reference;
	private String ctYarnType;
	
	private String ctYarnMaterial1;
	private String ctYarnMaterial2;
	private String ctYarnMaterial3;
	private String ctYarnMaterial4;
	private String ctYarnMaterial5;
	
	private Integer composition1;
	private Integer composition2;
	private Integer composition3;
	private Integer composition4;
	private Integer composition5;
	
	private String ctYarnShape;
	private String ctYarnMeasure;
	private Integer boutNumber;
	private String yarnAccount;
	
	private String ctYarnTwist1;
	private String ctYarnTwist2;
	private String ctYarnTwist3;
	
	private Integer tourNumber;
	
	private String isCarded;
	private String isSemiWorsted;
	private String isWorsted;
	private String isSpinningOther1;
	private String isSpinningOther2;
	private String isSpinningOther3;
	
	private Integer fiberLength1;
	private Integer fiberLength2;
	private Integer fiberLength3;
	private Integer fiberLength4;
	private Integer fiberLength5;
	
	private String isFibre;
	private String isHank;
	private String isBobbin;
	private String isSpace;
	private String isDyeingOther1;
	private String isDyeingOther2;
	private String isDyeingOther3;
	
	private String isRaw;
	private String isSolid;
	private String isChine;
	private String isTwisted;
	private String isFancy;
	private String isYarnOther1;
	private String isYarnOther2;
	private String isYarnOther3;
	
	private String isStockService;
	
	private String minDyeingTime1;
	private String deliveryTime1;
	private Float price1;
	private String studyDeadline1;
	private String minDyeingTime2;
	private String deliveryTime2;
	private Float price2;
	private String studyDeadline2;
	private String minDyeingTime3;
	private String deliveryTime3;
	private Float price3;
	private String studyDeadline3;
	
	private String comment;
	private Blob photo;
	private String photoName;
	
	private BiFactory biFactory;
	
	private Set productYarns = new HashSet(0);
	
	
	public Integer getId() {
		return id;
	}


	public void setId(Integer id) {
		this.id = id;
	}

	public String getCtYarnType() {
		return ctYarnType;
	}


	public void setCtYarnType(String ctYarnType) {
		this.ctYarnType = ctYarnType;
	}

	public String getReference() {
		return reference;
	}


	public void setReference(String reference) {
		this.reference = reference;
	}


	public String getCtYarnMaterial1() {
		return ctYarnMaterial1;
	}


	public void setCtYarnMaterial1(String ctYarnMaterial1) {
		this.ctYarnMaterial1 = ctYarnMaterial1;
	}


	public String getCtYarnMaterial2() {
		return ctYarnMaterial2;
	}


	public void setCtYarnMaterial2(String ctYarnMaterial2) {
		this.ctYarnMaterial2 = ctYarnMaterial2;
	}


	public String getCtYarnMaterial3() {
		return ctYarnMaterial3;
	}


	public void setCtYarnMaterial3(String ctYarnMaterial3) {
		this.ctYarnMaterial3 = ctYarnMaterial3;
	}


	public String getCtYarnMaterial4() {
		return ctYarnMaterial4;
	}


	public void setCtYarnMaterial4(String ctYarnMaterial4) {
		this.ctYarnMaterial4 = ctYarnMaterial4;
	}


	public String getCtYarnMaterial5() {
		return ctYarnMaterial5;
	}


	public void setCtYarnMaterial5(String ctYarnMaterial5) {
		this.ctYarnMaterial5 = ctYarnMaterial5;
	}


	public Integer getComposition1() {
		return composition1;
	}


	public void setComposition1(Integer composition1) {
		this.composition1 = composition1;
	}


	public Integer getComposition2() {
		return composition2;
	}


	public void setComposition2(Integer composition2) {
		this.composition2 = composition2;
	}


	public Integer getComposition3() {
		return composition3;
	}


	public void setComposition3(Integer composition3) {
		this.composition3 = composition3;
	}


	public Integer getComposition4() {
		return composition4;
	}


	public void setComposition4(Integer composition4) {
		this.composition4 = composition4;
	}


	public Integer getComposition5() {
		return composition5;
	}


	public void setComposition5(Integer composition5) {
		this.composition5 = composition5;
	}


	public String getCtYarnShape() {
		return ctYarnShape;
	}


	public void setCtYarnShape(String ctYarnShape) {
		this.ctYarnShape = ctYarnShape;
	}


	public String getCtYarnMeasure() {
		return ctYarnMeasure;
	}


	public void setCtYarnMeasure(String ctYarnMeasure) {
		this.ctYarnMeasure = ctYarnMeasure;
	}


	public Integer getBoutNumber() {
		return boutNumber;
	}


	public void setBoutNumber(Integer boutNumber) {
		this.boutNumber = boutNumber;
	}


	public String getCtYarnTwist1() {
		return ctYarnTwist1;
	}


	public void setCtYarnTwist1(String ctYarnTwist1) {
		this.ctYarnTwist1 = ctYarnTwist1;
	}


	public String getCtYarnTwist2() {
		return ctYarnTwist2;
	}


	public void setCtYarnTwist2(String ctYarnTwist2) {
		this.ctYarnTwist2 = ctYarnTwist2;
	}


	public String getCtYarnTwist3() {
		return ctYarnTwist3;
	}


	public void setCtYarnTwist3(String ctYarnTwist3) {
		this.ctYarnTwist3 = ctYarnTwist3;
	}


	public Integer getTourNumber() {
		return tourNumber;
	}


	public void setTourNumber(Integer tourNumber) {
		this.tourNumber = tourNumber;
	}


	public String getIsCarded() {
		return isCarded;
	}


	public void setIsCarded(String isCarded) {
		this.isCarded = isCarded;
	}


	public String getIsSemiWorsted() {
		return isSemiWorsted;
	}


	public void setIsSemiWorsted(String isSemiWorsted) {
		this.isSemiWorsted = isSemiWorsted;
	}


	public String getIsWorsted() {
		return isWorsted;
	}


	public void setIsWorsted(String isWorsted) {
		this.isWorsted = isWorsted;
	}


	public String getIsSpinningOther1() {
		return isSpinningOther1;
	}


	public void setIsSpinningOther1(String isSpinningOther1) {
		this.isSpinningOther1 = isSpinningOther1;
	}


	public String getIsSpinningOther2() {
		return isSpinningOther2;
	}


	public void setIsSpinningOther2(String isSpinningOther2) {
		this.isSpinningOther2 = isSpinningOther2;
	}


	public String getIsSpinningOther3() {
		return isSpinningOther3;
	}


	public void setIsSpinningOther3(String isSpinningOther3) {
		this.isSpinningOther3 = isSpinningOther3;
	}


	public Integer getFiberLength1() {
		return fiberLength1;
	}


	public void setFiberLength1(Integer fiberLength1) {
		this.fiberLength1 = fiberLength1;
	}


	public Integer getFiberLength2() {
		return fiberLength2;
	}


	public void setFiberLength2(Integer fiberLength2) {
		this.fiberLength2 = fiberLength2;
	}


	public Integer getFiberLength3() {
		return fiberLength3;
	}


	public void setFiberLength3(Integer fiberLength3) {
		this.fiberLength3 = fiberLength3;
	}


	public Integer getFiberLength4() {
		return fiberLength4;
	}


	public void setFiberLength4(Integer fiberLength4) {
		this.fiberLength4 = fiberLength4;
	}


	public Integer getFiberLength5() {
		return fiberLength5;
	}


	public void setFiberLength5(Integer fiberLength5) {
		this.fiberLength5 = fiberLength5;
	}


	public String getIsFibre() {
		return isFibre;
	}


	public void setIsFibre(String isFibre) {
		this.isFibre = isFibre;
	}


	public String getIsHank() {
		return isHank;
	}


	public void setIsHank(String isHank) {
		this.isHank = isHank;
	}


	public String getIsBobbin() {
		return isBobbin;
	}


	public void setIsBobbin(String isBobbin) {
		this.isBobbin = isBobbin;
	}


	public String getIsSpace() {
		return isSpace;
	}


	public void setIsSpace(String isSpace) {
		this.isSpace = isSpace;
	}


	public String getIsDyeingOther1() {
		return isDyeingOther1;
	}


	public void setIsDyeingOther1(String isDyeingOther1) {
		this.isDyeingOther1 = isDyeingOther1;
	}


	public String getIsDyeingOther2() {
		return isDyeingOther2;
	}


	public void setIsDyeingOther2(String isDyeingOther2) {
		this.isDyeingOther2 = isDyeingOther2;
	}


	public String getIsDyeingOther3() {
		return isDyeingOther3;
	}


	public void setIsDyeingOther3(String isDyeingOther3) {
		this.isDyeingOther3 = isDyeingOther3;
	}


	public String getIsStockService() {
		return isStockService;
	}


	public void setIsStockService(String isStockService) {
		this.isStockService = isStockService;
	}


	public String getMinDyeingTime1() {
		return minDyeingTime1;
	}


	public void setMinDyeingTime1(String minDyeingTime1) {
		this.minDyeingTime1 = minDyeingTime1;
	}


	public String getDeliveryTime1() {
		return deliveryTime1;
	}


	public void setDeliveryTime1(String deliveryTime1) {
		this.deliveryTime1 = deliveryTime1;
	}


	public Float getPrice1() {
		return price1;
	}


	public void setPrice1(Float price1) {
		this.price1 = price1;
	}

	public String getStudyDeadline1() {
		return studyDeadline1;
	}


	public void setStudyDeadline1(String studyDeadline1) {
		this.studyDeadline1 = studyDeadline1;
	}


	public String getStudyDeadline2() {
		return studyDeadline2;
	}


	public void setStudyDeadline2(String studyDeadline2) {
		this.studyDeadline2 = studyDeadline2;
	}


	public String getStudyDeadline3() {
		return studyDeadline3;
	}


	public void setStudyDeadline3(String studyDeadline3) {
		this.studyDeadline3 = studyDeadline3;
	}


	public String getMinDyeingTime2() {
		return minDyeingTime2;
	}


	public void setMinDyeingTime2(String minDyeingTime2) {
		this.minDyeingTime2 = minDyeingTime2;
	}


	public String getDeliveryTime2() {
		return deliveryTime2;
	}


	public void setDeliveryTime2(String deliveryTime2) {
		this.deliveryTime2 = deliveryTime2;
	}


	public Float getPrice2() {
		return price2;
	}


	public void setPrice2(Float price2) {
		this.price2 = price2;
	}


	public String getMinDyeingTime3() {
		return minDyeingTime3;
	}


	public void setMinDyeingTime3(String minDyeingTime3) {
		this.minDyeingTime3 = minDyeingTime3;
	}


	public String getDeliveryTime3() {
		return deliveryTime3;
	}


	public void setDeliveryTime3(String deliveryTime3) {
		this.deliveryTime3 = deliveryTime3;
	}


	public Float getPrice3() {
		return price3;
	}


	public void setPrice3(Float price3) {
		this.price3 = price3;
	}


	public Blob getPhoto() {
		return photo;
	}


	public void setPhoto(Blob photo) {
		this.photo = photo;
	}


	public String getPhotoName() {
		return photoName;
	}


	public void setPhotoName(String photoName) {
		this.photoName = photoName;
	}


	public BiFactory getBiFactory() {
		return biFactory;
	}


	public void setBiFactory(BiFactory biFactory) {
		this.biFactory = biFactory;
	}


	public Set getProductYarns() {
		return productYarns;
	}


	public void setProductYarns(Set productYarns) {
		this.productYarns = productYarns;
	}


	public String getComment() {
		return comment;
	}


	public void setComment(String comment) {
		this.comment = comment;
	}

	public String getIsRaw() {
		return isRaw;
	}


	public void setIsRaw(String isRaw) {
		this.isRaw = isRaw;
	}


	public String getIsSolid() {
		return isSolid;
	}


	public void setIsSolid(String isSolid) {
		this.isSolid = isSolid;
	}


	public String getIsChine() {
		return isChine;
	}


	public void setIsChine(String isChine) {
		this.isChine = isChine;
	}


	public String getIsTwisted() {
		return isTwisted;
	}


	public void setIsTwisted(String isTwisted) {
		this.isTwisted = isTwisted;
	}


	public String getIsFancy() {
		return isFancy;
	}


	public void setIsFancy(String isFancy) {
		this.isFancy = isFancy;
	}


	public String getIsYarnOther1() {
		return isYarnOther1;
	}


	public void setIsYarnOther1(String isYarnOther1) {
		this.isYarnOther1 = isYarnOther1;
	}


	public String getIsYarnOther2() {
		return isYarnOther2;
	}


	public void setIsYarnOther2(String isYarnOther2) {
		this.isYarnOther2 = isYarnOther2;
	}


	public String getIsYarnOther3() {
		return isYarnOther3;
	}


	public void setIsYarnOther3(String isYarnOther3) {
		this.isYarnOther3 = isYarnOther3;
	}

	public String getYarnAccount() {
		return yarnAccount;
	}


	public void setYarnAccount(String yarnAccount) {
		this.yarnAccount = yarnAccount;
	}

	@Override
	public boolean equals(Object obj) {
		if (!(obj instanceof BiYarn)) {
			return false;
		}
		BiYarn by = (BiYarn)obj;
		if(by.getReference().equals(this.getReference())){
			return true;
		}
		return false;
	}
	
	@Override
	public String toString() {
		return this.reference;
	}
}
